<script>
$("input[name='ButterflyPortal_data_MONTANT']").change(function() {
$("#ButterflyPortal_data_RESTE").val($(this).val()-$("#ButterflyPortal_data_AVANCE").val());
});



$("input[name='ButterflyPortal_data_AVANCE']").change(function() {
	$("#ButterflyPortal_data_RESTE").val($("#ButterflyPortal_data_MONTANT").val()-$(this).val());
	});



</script>